gdk_seat_get_pointer
gdk_seat_get_keyboard
gdk_seat_get_physical_devices
-gdk_seat_get_logical_pointers
<SUBSECTION Standard>
GDK_SEAT
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->get_tool (seat, serial, hw_id);
}
-
-/**
- * gdk_seat_get_logical_pointers:
- * @seat: The #GdkSeat
- * @capabilities: Queried capabilities
- *
- * Returns all logical pointers with the given capabilities driven by
- * this @seat.
- *
- * On most windowing system backends this function will return a list
- * with a single element (meaning that all input devices drive the same
- * on-screen cursor).
- *
- * In other windowing systems where there can possibly be multiple
- * foci (e.g. Wayland), this function will return all logical #GdkDevices
- * that represent these.
- *
- * Returns: (transfer container) (element-type GdkDevice): A list
- * of logical pointing devices
- */
-GList *
-gdk_seat_get_logical_pointers (GdkSeat *seat,
- GdkSeatCapabilities capabilities)
-{
- g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
-
- return GDK_SEAT_GET_CLASS (seat)->get_logical_pointers (seat, capabilities);
-}
GDK_AVAILABLE_IN_ALL
GdkDevice * gdk_seat_get_keyboard (GdkSeat *seat);
-GDK_AVAILABLE_IN_ALL
-GList * gdk_seat_get_logical_pointers (GdkSeat *seat,
- GdkSeatCapabilities capabilities);
-
G_END_DECLS
#endif /* __GDK_SEAT_H__ */
return NULL;
}
-static GList *
-gdk_seat_default_get_logical_pointers (GdkSeat *seat,
- GdkSeatCapabilities capabilities)
-{
- GList *pointers = NULL;
-
- if (capabilities & GDK_SEAT_CAPABILITY_ALL_POINTING)
- pointers = g_list_prepend (pointers, gdk_seat_get_pointer (seat));
-
- return pointers;
-}
-
static void
gdk_seat_default_class_init (GdkSeatDefaultClass *klass)
{
seat_class->get_logical_device = gdk_seat_default_get_logical_device;
seat_class->get_physical_devices = gdk_seat_default_get_physical_devices;
- seat_class->get_logical_pointers = gdk_seat_default_get_logical_pointers;
seat_class->get_tool = gdk_seat_default_get_tool;
}
GdkDeviceTool * (* get_tool) (GdkSeat *seat,
guint64 serial,
guint64 tool_id);
- GList * (* get_logical_pointers) (GdkSeat *seat,
- GdkSeatCapabilities capabilities);
};
void gdk_seat_device_added (GdkSeat *seat,
return physical_devices;
}
-static GList *
-gdk_wayland_seat_get_logical_pointers (GdkSeat *seat,
- GdkSeatCapabilities capabilities)
-{
- GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat);
- GList *logical_devices = NULL;
-
- if (capabilities & GDK_SEAT_CAPABILITY_POINTER)
- logical_devices = g_list_prepend (logical_devices, wayland_seat->logical_pointer);
- if (capabilities & GDK_SEAT_CAPABILITY_TOUCH)
- logical_devices = g_list_prepend (logical_devices, wayland_seat->logical_touch);
- if (capabilities & GDK_SEAT_CAPABILITY_TABLET_STYLUS)
- {
- GList *l;
-
- for (l = wayland_seat->tablets; l; l = l->next)
- {
- GdkWaylandTabletData *tablet = l->data;
-
- logical_devices = g_list_prepend (logical_devices, tablet->logical_device);
- }
- }
-
- return logical_devices;
-}
-
static void
gdk_wayland_seat_class_init (GdkWaylandSeatClass *klass)
{
seat_class->ungrab = gdk_wayland_seat_ungrab;
seat_class->get_logical_device = gdk_wayland_seat_get_logical_device;
seat_class->get_physical_devices = gdk_wayland_seat_get_physical_devices;
- seat_class->get_logical_pointers = gdk_wayland_seat_get_logical_pointers;
}
static void